package com.example.goods_service.dao;

import com.example.goods_service.vo.TCommodity;
import com.example.goods_service.vo.T_commodity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface Goods_gfc {
    @Select("select * from xx where type = #{goodstypeid} limit 3 #{max}")
    List<T_commodity> getgoods(int goodstypeid, int max);
    @Select("SELECT DISTINCT * FROM t_commodity b,`t_commodity_category` a  where a.id=b.category_id  AND b.category_id = ${goodsid} and b.status=1 limit 0,${key}")
    List<TCommodity>ppp(@Param("goodsid") int goodsid,@Param("key") int key);
    @Select("SELECT DISTINCT * FROM t_commodity b,`t_commodity_category` a  where a.id=b.category_id and b.status=1  limit ${key},20")
    List<TCommodity>ppp1(int key);
}
